package com.klangner.go.model;

import com.klangner.go.model.IBoard;
import com.klangner.go.model.Move;

import junit.framework.TestCase;

public class MoveTest extends TestCase{

	/**
	 * compare objects
	 */
	public void testEqualsMove() {
		Move move1;
		Move move2;
		
		move1 = new Move(IBoard.BLACK_STONE);
		move2 = new Move(IBoard.BLACK_STONE);
		assertTrue(move1.equals(move2));
		
		// both PASS
		move1 = new Move(IBoard.BLACK_STONE);
		move2 = new Move(1, 1, IBoard.BLACK_STONE);
		assertFalse(move1.equals(move2));
	}

	/**
	 * Check pass
	 */
	public void testIsPass() {
		Move move;
		
		move = new Move(IBoard.BLACK_STONE);
		assertTrue(move.isPass());
		
		move = new Move(1, 1, IBoard.BLACK_STONE);
		assertFalse(move.isPass());
	}

}
